package com.iotechn.unimall.admin.api.student;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.annotation.param.Range;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.UserDO;
import com.iotechn.unimall.data.entity.BookDo;
import com.iotechn.unimall.data.entity.StudentDo;
import com.iotechn.unimall.data.model.Page;

import java.util.List;

@HttpOpenApi(group = "admin.student", description = "用户管理")
public interface StudentManageService {

    @HttpMethod(description = "查询", permission = "user:user:list", permissionParentName = "用户管理", permissionName = "用户管理")
    public Page<StudentDo> list(
            @Range(min = 1) @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "当前页码") Integer pageNo,
            @Range(min = 1) @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度") Integer limit) throws ServiceException;

    @HttpMethod(description = "查询", permission = "user:user:bookshelf", permissionParentName = "用户管理", permissionName = "用户管理")
    public List<BookDo> getBookshelfByStuId(@HttpParam(name = "id", type = HttpParamType.COMMON, description = "用户ID") Integer id);

}
